package com.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author zhangyang
 * @since 2021-10-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_order")
public class Order extends Model {

    private static final long serialVersionUID = 1L;

    /**
     * 订单id
     */
    @TableId(value = "pk_orderId", type = IdType.AUTO)
    private Integer orderId;

    /**
     * 订单编号
     */
    @TableField("o_number")
    private String number;

    /**
     * 订单总价
     */
    @TableField("o_allMoney")
    private Double allMoney;

    /**
     * 订单完成时间
     */
    @TableField("o_finishTime")
    private String  finishTime;

    /**
     * 商家收入
     */
    @TableField("o_businessIncome")
    private Double businessIncome;

    /**
     * 骑手收入
     */
    @TableField("o_riderIncome")
    private Integer riderIncome;

    /**
     * 收货地址
     */
    @TableField("o_address")
    private String address;

    /**
     * 收货电话
     */
    @TableField("o_phone")
    private String phone;

    /**
     * 顾客名称
     */
    @TableField("o_username")
    private String username;

    /**
     * 顾客编号
     */
    @TableField("fk_customerId")
    private String customerId;

    /**
     * 商家编号
     */
    @TableField("fk_businessId")
    private String businessId;

    /**
     * 骑手编号
     */
    @TableField("fk_riderId")
    private String riderId;

    /**
     * 订单明细集合
     */
    @TableField(exist = false)
    private List<Detail> details;
}
